<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>saz.js saz.event</title>
	<meta name="language" content="ja" />
	
	<script type="text/javascript" src="../libs/dojo/dojo.js"></script>
	
	<script type="text/javascript" src="js/saz.js"></script>
	<script type="text/javascript" src="js/saz.event.js"></script>
	
</head>
<body>
<h1>saz.js saz.event</h1>
<script type="text/javascript">

var o = {name:'o'};
SAZ.event.Observer.initialize(o);
o.addObserver('test',function(e){
	console.log('o test handler');
});

var o2={name:'o2'};
SAZ.event.Observer.initialize(o2);
o2.addObserver('test2',function(e){
	console.log('o2 test2')
})

o2.dispatch(new SAZ.event.Event('test2'));
//o.dispatch('test',1);
o.dispatch(new SAZ.event.Event('test'));


var tim=setTimeout(function(){
	o2.dispatch(new SAZ.event.Event('test2'));
	o.dispatch(new SAZ.event.Event('test'));
}, 1000);


var we1 = new SAZ.event.WatchEvent('test', this, 'old', 'NEW!');
var we2 = new SAZ.event.WatchEvent('test2', this, 'old2', 'NEW!!');
//console.log('WatchEvent');
console.dir(we1);
console.dir(we2);

</script>
</body>
</html>
